package com.ty.day4;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/17 11:37
 */
public class PingpongPlayer extends Athletes {

    @Override
    void play() {
        System.out.println("play " + this.exercise);
    }

    @Override
    void print() {
        System.out.println("生日:" + this.date + ",性别:" + this.sex +
                ",运动:" + this.exercise);
    }

    @Override
    void eat(String food) {
        System.out.println("eat " + food);
    }

    @Override
    void work(String job) {
        System.out.println("work " + job);
    }
}

class Test {
    public static void main(String[] args) {
        PingpongPlayer player = new PingpongPlayer();
        player.date = "2002-01-20";
        player.sex = "男";
        player.exercise = "乒乓球";
        player.eat("大闸蟹");
        player.work("打比赛");
        player.play();
        player.print();
    }
}
